﻿using Firefly.Framework.Windows.ContentReaders;
using Firefly.Framework.Windows.Forms;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;

namespace Firefly.ContentPipeline.Windows.Forms
{
    [ContentTypeWriter]
    public class FormContentWriter : ContentTypeWriter<Form>
    {
        protected override void Write(ContentWriter output, Form value)
        {
            WriteForm(output, value);
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(FormContentReader).AssemblyQualifiedName;
        }

        internal static void WriteForm(ContentWriter output, Form value)
        {
            MoveableComponentContentWriter.WriteMoveableComponent(output, value);
        }
    }
}
